<?php
namespace App\Http\Controllers;
use App\Model\RegModel;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Validator;
class RegController extends Controller
{
	//注册用户
	public function reg(Request $request)
	{
		echo "成功执行";
		$user = $request->all();
		dump($user);
		exit();
		//var_dump($user);
		$validator = Validator::make($user,[
			'user'=>'required|max:10|min:6'
		],[
			'user.required'=>'请输入账号',
			'user.max'=>'账号不能超过10位',
			'user.min'=>'账号不能小于6位',
		]);
		if (! $validator->fails()) {
			var_dump( $validator->errors()->first());
		}
		
		//var_dump($input);
		//echo "string";*/
		/*$rega = new RegModel;
		$num = $rega->yzUser();
		var_dump($num);*/
	}

	public function updateData()
	{
		
	}

}